package com.assessment.dao;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import com.assessment.entity.AssessmentRecord;

@Repository
public interface AssessmentRecordRepository extends PagingAndSortingRepository<AssessmentRecord,Long>,JpaSpecificationExecutor<AssessmentRecord>
{

	@Query("from AssessmentRecord ar where ar.staff.id=?1 and ar.assessmentProject.id=?2")
	public  AssessmentRecord findRecordByStaffIdAndProjectId(Long staffId, Long projectId);

}
